package com.jintoufs.service.account.impl;

import com.jintoufs.dao.QueryFilters;
import com.jintoufs.dao.account.WithdrawMapper;
import com.jintoufs.domain.account.Withdraw;
import com.jintoufs.service.account.WithdrawService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class WithdrawServiceImpl implements WithdrawService {
    @Resource
    private WithdrawMapper withdrawMapper;
    @Override
    public int insert(Withdraw withdraw) {
        return withdrawMapper.insertSelective(withdraw);
    }

    @Override
    public int update(Withdraw withdraw) {
        return withdrawMapper.updateByPrimaryKey(withdraw);
    }

    @Override
    public Withdraw selectById(String id) {
        return withdrawMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Map<String,Object>> getByFilter(QueryFilters filters) {
        List<Map<String,Object>> result = withdrawMapper.getByFilter(filters);
        return result;
    }

    @Override
    public List<Map<String, Object>> getByParams(Map<String, Object> param) {
        return withdrawMapper.getByParams(param);
    }
}
